package com.woniuxy.service.impl;

import com.woniuxy.Mapper.departmentMapper;
import com.woniuxy.entity.Department;
import com.woniuxy.entity.Doctor;
import com.woniuxy.service.departmentService;
import com.woniuxy.vo.schedulesDoc;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class departmentImpl implements departmentService {

    @Autowired
    departmentMapper departmentmapper;
    @Override
    public List<Department> findAll() {
        return departmentmapper.findAll();
    }

    @Override
    public List<Doctor> getDoctorsByDepartID(Department department) {
        return departmentmapper.getDoctorsByDepartID(department.getDepartmentId());
    }

    @Override
    public List<schedulesDoc> getSchedules(Integer doctorId) {
        return departmentmapper.getSchedules(doctorId);
    }
}
